﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Demo0531
{
    class StuSort: IComparer<Student>
    {
        public int Compare(Student x, Student y) 
        {
            //排序
            //if (x.StuNum > y.StuNum)
            //{
            //    return 1;
            //}
            //else
            //{
            //    return -1;
            //}

            return x.StuNum.CompareTo(y.StuNum);
        } 
    }
}
